package com.boot.repository;

import com.boot.entity.Classroom;
import com.boot.entity.CourseInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.jdbc.core.DataClassRowMapper;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.util.List;

@Repository
@Transactional
public interface ClassroomRepository extends JpaRepository<Classroom, Integer>, JpaSpecificationExecutor<Classroom>{

    Boolean existsByClassroomName(String classroomName);
    List<Classroom> findAllByBuildingName(String buildingName);
    Classroom findByClassroomName(String classroomName);
    Classroom findByClassroomId(Integer id);
    void deleteByClassroomName(String classroomName);


}
